package com.android.supermarket.activity

import android.content.Context
import android.os.Bundle
import android.os.CountDownTimer
import com.android.supermarket.BaseActivity
import com.android.supermarket.component.WelcomeActivityUI
import org.jetbrains.anko.setContentView
import org.jetbrains.anko.startActivity

/**
 * Created by pengtaoH on 2018/7/19.
 */
class WelcomeActivity : BaseActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        WelcomeActivityUI().setContentView(this)
//        TimeCountDown(this, 5000, 1000).start()

    }

    class TimeCountDown(var context: Context, millisInFuture: Long, countDownInterval: Long) : CountDownTimer(millisInFuture, countDownInterval) {
        override fun onFinish() {
            context.startActivity<LoginActivity>()
        }

        override fun onTick(millisUntilFinished: Long) {

        }

    }

//    companion object {
//        fun goNext() {
//            startActivity<LoginActivity>()
//        }
//    }
}